package com.sailors.common.task.provider.infra.design.common.rest;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
public enum ReturnCode {
    // 200
    SUCCESS(200000, "success"),

    //300
    LOGON_FAILURE(300000, "登录失效"),
    MSG_LOGIN_NOT_JOB(300001, "员工已离职"),

    //400
    MISSING_KEY_PARAM(400001, "缺少关键参数"),
    PARAM_ILLEGAL(400002, "参数不合法"),
    FILE_TOO_BIG(400003, "上传文件过大"),

    //401
    NO_PERMISSIONS(401000, "没有权限"),

    //403
    OPERATION_FAILED(403001, "操作失败"),
    INFO_ALREADY_EXISTS(403002, "数据已存在"),

    //404
    RESOURCE_NONEXISTENCE(404001, "资源不存在"),

    //405
    MATCH_THE_USER(405000, "您的账号已在另一台机器上登录,请重新登录!"),


    // 500
    SERVER_INTERNAL_ERROR(500000, "服务器内部错误"),
    MAX_UPLOAD_SIZE_EXCEEDED0(51001002, "超过最大上传大小"),
    MAX_UPLOAD_SIZE_EXCEEDED1(51001003, "超过最大上传大小，最大上传大小为"),
    REQUEST_METHOD_NOT_SUPPORTED(51001004, "请求方法不支持"),
    DATA_DUPLICATION(51001005, "重复数据"),
    BAD_REQUEST_BODY(51001006, "错误的请求体"),
    MISSING_REQUEST_PARAMETER(51001007, "参数缺失"),
    PARAMETER_VERIFICATION_FAILS(51001008, "参数校验失败");
    private Integer code;
    private String msg;
}
